package com.edu.service.impl;

import com.edu.dao.EventVersionMapper;
import com.edu.model.EventDefine;
import com.edu.model.EventVersion;
import com.edu.service.EventVersionService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

@Service
public class EventVersionServiceImpl implements EventVersionService {
    @Resource
    private EventVersionMapper eventVersionMapper;

    @Override
    public EventVersion getNewestEventVersion(EventDefine eventDefine){

        if (eventDefine == null || eventDefine.getEventId() == null) {
            return null;
        }
        EventVersion eventVersion = eventVersionMapper.getNewestEventVersion(eventDefine);
        return eventVersion;
    }
}
